import Vue from "vue";
import VueRouter from "vue-router";
import Layout from "../views/Layout.vue";

Vue.use(VueRouter);

const routes = [
  {
    path: "/",
    name: "Layout",
    component: Layout,
  },
  {
    path: "/login",
    name: "login",
    component: () =>
      import(/* webpackChunkName: "login" */ "../views/LoginView.vue"),
  },
  {
    path: "/register",
    name: "register",
    component: () =>
      import(/* webpackChunkName: "register" */ "../views/LoginView.vue"),
  },
  {
    path: "/system",
    name: "system",
    component: Layout,
    children: [
      {
        path: "/system/userManager",
        name: "userManager",
        component: () =>
          import(
            /* webpackChunkName: "userManager" */ "../views/system/userManager/index.vue"
          ),
      },
      {
        path: "/system/postManager",
        name: "postManager",
        component: () =>
          import(
            /* webpackChunkName: "postManager" */ "../views/system/postManager/index.vue"
          ),
      },
    ],
  },
  {
    path: "/login111",
    name: "login1111",
    component: () =>
      import(/* webpackChunkName: "login" */ "../views/LoginView123.vue"),
  },
  {
    path: "/test",
    name: "test",
    component: () =>
      import(/* webpackChunkName: "test" */ "../views/LoginView123.vue"),
  },
  {
    path: "/jinyahui",
    name: "jinyahui",
    component: () =>
      import(/* webpackChunkName: "test" */ "../views/jinyahui.vue"),
  },
  {
    path: "/suming",
    name: "suming",
    component: () =>
      import(/* webpackChunkName: "suming" */ "../views/LoginView123.vue"),
  },
  
];

const router = new VueRouter({
  mode: "history",
  base: process.env.BASE_URL,
  routes,
});

export default router;
